import sys
import codecs

def utf8_to_utf16le(input_file):
    with open(input_file, "r", encoding="utf-8") as f_in:
        utf8_text = f_in.read()

    output_file = input_file + ".new"
    with open(output_file, "wb") as f_out:
        utf16le_text = utf8_text.encode("utf-16-le")
        f_out.write(utf16le_text)

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: python script.py <input_file>")
    else:
        input_file = sys.argv[1]  # 获取命令行参数中的输入文件名
        utf8_to_utf16le(input_file)
